<template>
  <div class="noshop">
    <h1>该商铺没有商品</h1>
    <p>即将为你跳到主页</p>
  </div>
</template>

<script lang="ts">
import { defineComponent, onMounted } from "vue";
import { useRouter } from "vue-router";

export default defineComponent({
  name: "Noshop",
  setup() {
    let router: any = useRouter();
    let prompt: () => void = (): void => {
      setTimeout(() => {
        router.push({
          name: "Home",
        });
      }, 3000);
    };
    onMounted(() => {
      prompt();
    });
    return {};
  },
});
</script>

<style lang="scss" scoped>
.noshop {
  text-align: center;
}
</style>